//
//  PictureMgr.h
//  carcareIOS
//
//  Created by wr on 16/1/26.
//  Copyright © 2016年 baozun. All rights reserved.
//

#import <Foundation/Foundation.h>

#define PICTUREMGR [PictureMgr sharedInstance]

//行驶证主页面
static NSString * const ICZ_UPLOAD_IMAGE_XSZ = @"drivingFront";
//行驶证副页正面
static NSString * const ICZ_UPLOAD_IMAGE_XSZ_ONE = @"drivingBack";
//行驶证副页正面
static NSString * const ICZ_UPLOAD_IMAGE_XSZ_TWO = @"drivingCopy";
//身份证正面
static NSString * const ICZ_UPLOAD_IMAGE_IDCAR_ONE = @"idCardFront";
//身份证反面
static NSString * const ICZ_UPLOAD_IMAGE_IDCAR_TWO = @"idCardBack";

typedef void (^CallBack)(UIImage *);

@interface PictureMgr : NSObject

DEF_SINGLETON

/**
    调用该方法会出现选择相机相册界面，当用户选择完图片以后会返回所选择的图片
 */
- (void)selectPictureWithController:(UIViewController *)viewController callBack:(CallBack)backImageBlock;

/**
    调用该方法用于压缩图片，把制定的图片压缩到指定的大小
    （压缩到指定大小  单位b   eg:1k ＝ 1024b）
 */
//- (void)pictrueCutWithImage:(UIImage *)image toSize:(CGFloat)sizeFloat callBack:(void(^)(UIImage * backImage,NSData * backImageData))callBack;

/**
    该方法用于上传图片，到指定的路径 picturePath图片文件夹名称 如：“Ubao”  pictureType图片类型  如：“XSZ”(行驶证)
 */
- (void)uploadPictureType:(NSString *)pictureType withNetSuccess:(void (^)(id JSON))success fail:(void (^)(id JSON))fail;

@end
